/*
 *  StickFigure.h
 *  pogostick
 *
 *  Created by daddy (chuck@kollar.com) on 8/22/09.
 *  Copyright 2009 Charles P. Kollar All rights reserved.
 *
 *  This program is free software: you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation, either version 3 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

#import <Foundation/Foundation.h>

#import <stdlib.h>
#import <stdio.h>
#import <string.h>
#import <math.h>
#import <limits.h>

#import "cocos2d.h"
#import "chipmunk.h"

#import "common.h"
#import "BodyJoint.h"


@interface StickFigure : NSObject {
    NSString *identifier;
    
	cpSpace *space;
	cpFloat stickHeight, gravity, riderMass;
	unsigned int group;
	
	cpBody *trunkBody, *headBody;
	cpConstraint *neckJoint;
	
	cpBody *armRUBody, *armRLBody, *armLUBody, *armLLBody;
	BodyJoint *rSholderJoint, *lSholderJoint;
	BodyJoint *rElbowJoint, *lElbowJoint;
	
	cpBody *legRUBody, *legRLBody, *legLUBody, *legLLBody;
	BodyJoint *rHipJoint, *lHipJoint;
	BodyJoint *rKneeJoint, *lKneeJoint;
	
	cpConstraint *staticJoint;
	int blood, bullets;
	
	unsigned int shootingHand;
}

@property (readwrite,assign) NSString *identifier;
@property (readwrite,assign) cpSpace *space;
@property (readwrite,assign) cpFloat stickHeight;
@property (readwrite,assign) cpFloat gravity;
@property (readwrite,assign) cpFloat riderMass;
@property (readwrite,assign) unsigned int group;
@property (readwrite,assign) BodyJoint *rSholderJoint;
@property (readwrite,assign) BodyJoint *lSholderJoint;
@property (readwrite,assign) BodyJoint *rElbowJoint;
@property (readwrite,assign) BodyJoint *lElbowJoint;
@property (readwrite,assign) BodyJoint *rHipJoint;
@property (readwrite,assign) BodyJoint *lHipJoint;
@property (readwrite,assign) BodyJoint *rKneeJoint;
@property (readwrite,assign) BodyJoint *lKneeJoint;
@property (readwrite,assign) cpConstraint *staticJoint;
@property (readwrite,assign) unsigned int shootingHand;


#define MAXBLOOD                        50


-(id) init;
-(void) dealloc;
-(void) die;
-(void) performActions;

@end
